package com.example.mapper;

import com.example.pojo.Quality;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface QualityMapper {
    @Insert("insert into qualityInspections (taskID,inspectorID,inspectionDate,result,notes) values (#{taskID},#{inspectorID},#{inspectionDate},#{result},#{notes})")
    void add(Quality quality);

    Long count(int inspectorID, String result, LocalDate begin, LocalDate end);

    List<Quality> page(Integer start, Integer pageSize, int inspectorID, String result, LocalDate begin, LocalDate end);

    void delete(int[] id);
}
